package mdv.exp.items.list;

import com.example.expenses.R;
import com.example.expenses.R.id;
import com.example.expenses.R.layout;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.TextView;

public class ItemsListRowView extends LinearLayout {

	private TextView row1;
	private TextView row2;
	private TextView row3;
	private TextView row4;
	private TextView row5;
	private TextView row6;
	private TextView row7;
	private TextView row8;
	private TextView row9;
	private TextView row10;
	

	public ItemsListRowView(Context context, AttributeSet attrs) {
		super(context, attrs);
		// TODO Auto-generated constructor stub
	}
	
	public ItemsListRowView(Context context) {
		super(context);
		LayoutInflater inflater = (LayoutInflater)context.getSystemService
                  (Context.LAYOUT_INFLATER_SERVICE);

        inflater.inflate(R.layout.list_row, this, true);
		row1 = (TextView)findViewById(R.id.val1);
		row2 = (TextView)findViewById(R.id.val2);
		row3 = (TextView)findViewById(R.id.val3);
		row4 = (TextView)findViewById(R.id.val4);
		row5 = (TextView)findViewById(R.id.val5);
		row6 = (TextView)findViewById(R.id.val6);
		row7 = (TextView)findViewById(R.id.val7);
		row8 = (TextView)findViewById(R.id.val8);
		row9 = (TextView)findViewById(R.id.val9);
		row10 = (TextView)findViewById(R.id.val10);
	}
	
	public void setData(ItemsListRowData data){
		row1.setText(data.getRow1Val());
		row2.setText(data.getRow2Val());
		row3.setText(data.getRow3Val());
		row4.setText(data.getRow4Val());
		row5.setText(data.getRow5Val());
		row6.setText(data.getRow6Val());
		row7.setText(data.getRow7Val());
		row8.setText(data.getRow8Val());
		row9.setText(data.getRow9Val());
		row10.setText(data.getRow10Val());
	}

}
